package com.sasis.model;
// Generated 2007-8-7 10:00:49 by Hibernate Tools 3.1.0.beta4

import java.math.BigDecimal;


/**
 * @struts.form include-all="true" extends="BaseForm"
 * @hibernate.class
 *         table="CONSUME_PRODUCT"
 *     
 */

public class ConsumeProduct extends com.sasis.model.BaseObject implements java.io.Serializable {


    // Fields    

    private Integer id;
    private String productName;
    private BigDecimal productPrice;
    private String remark;


    // Constructors

    /** default constructor */
    public ConsumeProduct() {
    }

    
    /** full constructor */
    public ConsumeProduct(String productName, BigDecimal productPrice, String remark) {
        this.productName = productName;
        this.productPrice = productPrice;
        this.remark = remark;
    }
    

   
    // Property accessors
    /**       
     *      *            @hibernate.id
     *             generator-class="native"
     *             type="java.lang.Integer"
     *             column="ID"
     *         
     */

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    /**       
     *      *            @hibernate.property
     *             column="PRODUCT_NAME"
     *             length="64"
     *         
     */

    public String getProductName() {
        return this.productName;
    }
    
    public void setProductName(String productName) {
        this.productName = productName;
    }
    /**       
     *      *            @hibernate.property
     *             column="PRODUCT_PRICE"
     *             length="18"
     *         
     */

    public BigDecimal getProductPrice() {
        return this.productPrice;
    }
    
    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }
    /**       
     *      *            @hibernate.property
     *             column="REMARK"
     *             length="1024"
     *         
     */

    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
   

    /**
     * toString
     * @return String
     */
     public String toString() {
	  StringBuffer buffer = new StringBuffer();

      buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
      buffer.append("productName").append("='").append(getProductName()).append("' ");			
      buffer.append("productPrice").append("='").append(getProductPrice()).append("' ");			
      buffer.append("remark").append("='").append(getRemark()).append("' ");			
      buffer.append("]");
      
      return buffer.toString();
     }


   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof ConsumeProduct) ) return false;
		 ConsumeProduct castOther = ( ConsumeProduct ) other; 
         
		 return ( (this.getId()==castOther.getId()) || ( this.getId()!=null && castOther.getId()!=null && this.getId().equals(castOther.getId()) ) )
 && ( (this.getProductName()==castOther.getProductName()) || ( this.getProductName()!=null && castOther.getProductName()!=null && this.getProductName().equals(castOther.getProductName()) ) )
 && ( (this.getProductPrice()==castOther.getProductPrice()) || ( this.getProductPrice()!=null && castOther.getProductPrice()!=null && this.getProductPrice().equals(castOther.getProductPrice()) ) )
 && ( (this.getRemark()==castOther.getRemark()) || ( this.getRemark()!=null && castOther.getRemark()!=null && this.getRemark().equals(castOther.getRemark()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getId() == null ? 0 : this.getId().hashCode() );
         result = 37 * result + ( getProductName() == null ? 0 : this.getProductName().hashCode() );
         result = 37 * result + ( getProductPrice() == null ? 0 : this.getProductPrice().hashCode() );
         result = 37 * result + ( getRemark() == null ? 0 : this.getRemark().hashCode() );
         return result;
   }   





}
